package ch02_data.compare;

import lombok.Data;

/**
 * The class/interface
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
@Data
public class Goods implements Comparable<Integer> {
    /**
     * 属性描述：名称
     */
    private String name;

    private Integer age;


    @Override
    public int compareTo(Integer o) {
        return age.compareTo(o);
    }
}
